export type CompType =
    'input'
    | 'select'
    | 'region'
    | 'datePicker'
    | 'timePicker'
    | 'calendar'
    | 'switch'
    | 'radio'
    | 'checkbox'

export interface Cells {
    labelWidth?: string
    labelAlign?: 'left' | 'right' | 'top'
    type: CompType
    name: string
    label: string
    required?: boolean
    placeholder?: string
    enumKey?: string // 字典数据字段名
    columnsFieldNames?: Record<string, any>
    defaultValue?: any,
    bind?: Record<string, any>
    event?: string
    show?: boolean // 添加显示控制属性
}

export interface FormItem {
    title?: string
    cells: Cells[]
}

export interface Config {
    labelWidth?: string
    labelAlign?: 'left' | 'right' | 'top'
    formData: Record<string, any>
    enums: Record<string, any[]>
    formItems: FormItem[]
    rules?: Record<string, any>[]
    operatorList: Record<string, any>[]
}

export interface Settings {
    dateSeparator: string
    timeSeparator: string
    regionSeparator: string
}